import request from "@/utils/request";
// 获取树marker
export function getMarkersByRegion(level,code) { 
    return request({
        url: "/tree/markers?level="+level+"&code="+code,
        method: "get"
    });
}
// 根据id获取古树详细数据
export function getTreeDetailsById(id){
    return request({
        url: "/tree/details/"+id,
        method: "get"
    });
}
// 获取古树统计数据
export function getTreeStatistics(level, regionCode){
    return request({
        url: "/tree/statistics?level="+level+"&code="+regionCode,
        method: "get"
    });
}


// 获取古树的详细信息
export function getTreeDetailInfo(treeId){
    return request({
        url: "/tree/details/"+treeId,
        method: "get"
    });
}

// 获取古树异常列表
export function getTreeIssueReportList(param){
    return request({
        url: "/tree/issue",
        method: "get",
        params:param
    });
}
//批量删除古树异常报告
export function deleteTreeIssueReport(ids){
    return request({
        url: "/tree/issue",
        method: "delete",
        data:ids
    });
}

// 获取古树异常列表
export function setTreeIssueReport(param){
    return request({
        url: "/tree/issue",
        method: "put",
        data:param
    });
}

// 获取古树列表
export function getTreeList(param){
    return request({
        url: "/tree",
        method: "get",
        params:param
    });
}
// 删除古树
export function deleteTrees(ids){
    return request({
        url: "/tree",
        method: "delete",
        data:ids
    });
}

// 添加古树
export function addTree(param){
    return request({
        url: "/tree",
        method: "post",
        data:param
    });
}